//
//  NSData+ex.swift
//  WZApp
//
//  Created by evol on 2018/7/9.
//  Copyright © 2018年 evol. All rights reserved.
//

import UIKit

extension NSData {
    func saveImage(_ key: String) -> Bool {
        guard key.count > 0 else {
            return false
        }
        self.write(to: URL(string: key.imageCachePath)!, atomically: true)
        return true
    }
}
